--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit ad4662efa8f90998a5c5108e85fd0eb00e40f234
Parents : 969a3c5
Author : Mark Qvist <mark@unsigned.io>
Date : 2022-07-08T13:12:32+02:00
Updated build to use RNS v0.3.10
Changes
3 files changed, 36 insertions(+), 6 deletions(-)
Diff
diff --git a/sbapp/Makefile b/sbapp/Makefile
index 453b35a3..80956084 100644
--- a/sbapp/Makefile
+++ b/sbapp/Makefile
@@ -28,7 +28,7 @@ apk: prepare release postbuild
devapk: prepare debug postbuild
install:
- adb install bin/sideband-0.1.6-arm64-v8a-release.apk
+ adb install bin/sideband-0.1.7-arm64-v8a-release.apk
console:
(adb logcat | grep python)
diff --git a/sbapp/main.py b/sbapp/main.py
index 8075cedf..5fbfbf25 100644
--- a/sbapp/main.py
+++ b/sbapp/main.py
@@ -34,7 +34,7 @@ from kivy.metrics import dp
from kivymd.uix.button import MDFlatButton
from kivymd.uix.dialog import MDDialog
-__version__ = "0.1.6"
+__version__ = "0.1.7"
__variant__ = "beta"
if RNS.vendor.platformutils.get_platform() == "android":
diff --git a/setup.py b/setup.py
index 3615af52..e705131e 100644
--- a/setup.py
+++ b/setup.py
@@ -1,11 +1,41 @@
+import os
+import re
import setuptools
-__version__ = "0.1.6"
-__variant__ = "beta"
-
with open("README.md", "r") as fh:
long_description = fh.read()
+def get_version() -> str:
+ version_file = os.path.join(
+ os.path.dirname(__file__), "sbapp", "main.py"
+ )
+
+ version_file_data = open(version_file, "rt", encoding="utf-8").read()
+ version_regex = r"(?<=^__version__ = ['\"])[^'\"]+(?=['\"]$)"
+ try:
+ version = re.findall(version_regex, version_file_data, re.M)[0]
+ return version
+ except IndexError:
+ raise ValueError(f"Unable to find version string in {version_file}.")
+
+def get_variant() -> str:
+ version_file = os.path.join(
+ os.path.dirname(__file__), "sbapp", "main.py"
+ )
+
+ version_file_data = open(version_file, "rt", encoding="utf-8").read()
+ version_regex = r"(?<=^__variant__ = ['\"])[^'\"]+(?=['\"]$)"
+ try:
+ version = re.findall(version_regex, version_file_data, re.M)[0]
+ return version
+ except IndexError:
+ raise ValueError(f"Unable to find version string in {version_file}.")
+
+__version__ = get_version()
+__variant__ = get_variant()
+
+print("Packaging Sideband "+__version__+" "+__variant__)
+
setuptools.setup(
name="sbapp",
version=__version__,
@@ -26,6 +56,6 @@ setuptools.setup(
'sideband=sbapp:main.run',
]
},
- install_requires=['rns>=0.3.9', 'lxmf>=0.1.7', 'kivy==2.1.0', 'plyer'],
+ install_requires=['rns>=0.3.10', 'lxmf>=0.1.7', 'kivy==2.1.0', 'plyer'],
python_requires='>=3.6',
)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────